<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../core/include.inc.jsp"%>
<script type="text/javascript">
    //重置
    $(".survey-list-reset-button").click(function(){
        $(".survey_list_page_form input[name='blockName']").val("");
        $(".survey_list_page_form input[name='blockName']").val("");
        $(".survey_list_page_form input[name='pageNum']").val("20");
        $(".survey_list_page_form").submit();
    })
    //查询
    $(".survey-list-search-button").click(function(){
      var blockName = $(".survey-list-div input[name='blockName']").val().trim();
      $(".survey_list_page_form input[name='blockName']").val(blockName);
      $(".survey_list_page_form").submit();
    })
</script>
<%--表单区域--%>
<form id="pagerForm" onsubmit="return navTabSearch(this);" method="post" action="survey_list" class="survey_list_page_form">
  <input type="hidden" name="pageNum" value="${pageModel.pageNum}" />
  <input type="hidden" name="numPerPage" value="${pageModel.numPerPage}" />
  <input type="hidden" name="blockName" value="${blockName}" />
</form>

<%--<form onsubmit="return navTabSearch(this);" action="survey_list" method="post">--%>
  <div class="pageHeader">
    <div class="searchBar">
      <ul class="searchContent survey-list-div">
        小区名称
        <input type="text" name="blockName" value="${blockName}" class="textInput" />
        &nbsp;&nbsp;
        <input type="button" value="查询" class="survey-list-search-button" />
        &nbsp;&nbsp;
        <input type="button" value="重置" class="survey-list-reset-button" />
      </ul>
    </div>
  </div>
  <div class="pageContent">
    <div class="panelBar">
      <ul class="toolBar">
        <li><a class="add" href="to_add_survey" target="dialog" width="600" height="600" mask="true" title="添加概况">
            <span>新增</span>
            </a>
        </li>
        <li class="line">line</li>
        <li>
          <a class="edit" href="to_edit_community_survey?id={survey_id}" target="dialog" width="600" height="600" mask="true">
            <span>修改</span>
          </a>
        </li>
        <li class="line">line</li>
        <li>
          <a class="edit" href="to_detail_survey?id={survey_id}" target="dialog" width="600" height="600" mask="true">
            <span>查看详情</span>
          </a>
        </li>
        <li class="line">line</li>
        <li>
          <a class="delete" href="delete_community_survey?id={survey_id}" target="ajaxTodo" title="确定要删除吗?">
            <span>删除</span>
          </a>
        </li>
        <li class="line">line</li>
      </ul>
    </div>
    <table class="table" width="100%" layoutH="110">
      <thead>
      <tr>
        <th>序号</th>
        <th>小区名称</th>
        <th>社区概况</th>
        <th>备注</th>
        <th>创建时间</th>
      </tr>
      </thead>
      <tbody>
      <c:forEach var="survey" items="${surveys}" varStatus="st">
        <tr target="survey_id" rel="${survey.id}">
          <td>${st.index+1}</td>
          <td>${survey.blockName}</td>
          <td>${survey.communityContent}</td>
          <td>${survey.remark}</td>
          <td>
            <fmt:formatDate value="${survey.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
          </td>
        </tr>
      </c:forEach>
      </tbody>
    </table>
    <c:import url="../core/pagebar.inc.jsp" />
  </div>
<%--</form>--%>



